let obj = {
  studentName: 'jack',
  age: 18
}

let { studentName, age } = obj;
// console.log(studentName, age);

let [first, second] = [1, 2, 3, 4];

// console.log(first, second);


let a = 'hello',
  b = 'world';

[a, b] = [b, a];
// console.log(a, b);


// 展开符
let arr = ['a', 'b', 'c', 'd', 'e'];
let arr2 = [...arr, 1, 2, 3]; // 实际上在合并数组
// console.log(arr2);

let obj1 = {
  name: 'jack',
  age: 18
}

let obj2 = {
  ...obj1,
  city: 'chengdu'
}
// console.log(obj2);

let [aa, ...bb] = [0, 1, 2, 3, 4, 5];
console.log(aa, bb); // 0 [ 1, 2, 3, 4, 5 ]